/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.femass.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;


@Embeddable
public class InscricaoPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "Participante_cod")
    private int participantecod;
    @Basic(optional = false)
    @NotNull
    @Column(name = "Evento_cod")
    private int eventocod;

    public InscricaoPK() {
    }

    public InscricaoPK(int participantecod, int eventocod) {
        this.participantecod = participantecod;
        this.eventocod = eventocod;
    }

    public int getParticipantecod() {
        return participantecod;
    }

    public void setParticipantecod(int participantecod) {
        this.participantecod = participantecod;
    }

    public int getEventocod() {
        return eventocod;
    }

    public void setEventocod(int eventocod) {
        this.eventocod = eventocod;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) participantecod;
        hash += (int) eventocod;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof InscricaoPK)) {
            return false;
        }
        InscricaoPK other = (InscricaoPK) object;
        if (this.participantecod != other.participantecod) {
            return false;
        }
        if (this.eventocod != other.eventocod) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.femass.model.InscricaoPK[ participantecod=" + participantecod + ", eventocod=" + eventocod + " ]";
    }

}
